package openapi

type InvokeFlowRequest struct {
	ExecutionName string `json:"executionName,omitempty"`
	// 输入,json字符串
	Input string `json:"input"`
	// 工作流名称
	WorkflowName string `json:"workflowName"`
}

// Openapi response结构体
type OpenAPIResponseMeta[T any] struct {
	StatusCode int32  `json:"statusCode"`
	Error      string `json:"error"`
	Message    string `json:"message"`
	ReturnObj  T      `json:"returnObj"`
}

type WorkflowQueryRequest struct {
	PageNum     uint32 `json:"pageNum" query:"pageNum"`
	PageSize    uint32 `json:"pageSize" query:"pageSize"`
	QueryPrefix string `json:"queryPrefix" query:"queryPrefix"`
}

type WorkflowQueryResponse struct {
	Flows    []WorkflowGetResponse `json:"flows"`
	Total    uint32                `json:"total"`
	PageNum  uint32                `json:"pageNum"`
	PageSize uint32                `json:"pageSize"`
}

type WorkflowGetResponse struct {
	WorkflowID       string `json:"workflowId"`
	Name             string `json:"name"`
	Definition       string `json:"definition"`
	Description      string `json:"description"`
	Role             string `json:"role"`
	Region           string `json:"region"`
	ExecutionMode    string `json:"executionMode"`
	ExecutionTimeout uint64 `json:"executionTimeout"`
	CreatedTime      int64  `json:"createdTime"`
	UpdatedTime      int64  `json:"updatedTime"`
}
